<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // var a = [];
        // a[0] = [1, 2, 3];
        // a[1] = [4, 5, 6];
        // a[2] = [7, 8, 9];
        // for (let i = 0; i < a.length; i++) {
        //     for(let j = 0; j<a[i].length; j++){
        //         if(i == j)
        //             console.log(a[i][j]);
        //     }
            
        // }
        var x= 10;
        function test(x){
            x++;
        }
        test(x);
        console.log(x);

        var a =[10,20,30];
        function test2(d){
            d[0]+=1;
        }
        test2(a);
        console.log(a[0]);
    </script>
</body>

</html>